@use './dashboard.scss';
@use './select-chapter.scss';
@use './practicing.scss';

$page-header-height: 110px;
$page-footer-height: 60px;

.page-wrapper {
  height: 100%;
  display: flex;
  flex-direction: column;

  >.header {
    width: 100%;
    height: $page-header-height;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 60px;

    .right-btn {
      background-color: var(--box-bg-color);
      height: 60%;
      padding: 0 30px;
      border-radius: 10px;
      display: flex;
      align-items: center;
      box-shadow: var(--base-box-shadow);

      span.menu {
        padding: 0 10px;
        color: var(--base-text-color-secondary);
        cursor: pointer;
        user-select: none;
        &:hover {
          color: var(--primary-color);
        }
      }

      span.text {
        padding: 0 10px;
        color: var(--base-text-color-secondary);
      }

      .svg-icon {
        width: 20px;
        height: 20px;
        fill: var(--base-text-color-secondary);
        padding: 5px;
        cursor: pointer;
        &:hover {
          fill: var(--primary-color);
        }
      }

      .m-button {
        margin-left: 16px;
      }
    }
  }

  >.content-wrapper {
    height: calc(100% - $page-header-height - $page-footer-height);
  }

  >.footer {
    width: 100%;
    height: $page-footer-height;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--base-text-color-light2);

    .svg-icon {
      width: 16px;
      height: 16px;
      fill: var(--base-text-color-light2);
    }

    .icon-coffee {
      margin-right: 30px;
      cursor: pointer;
    }
  }
}
.m-dialog-wrapper.buy-me-coffee .m-dialog-body {
  padding: 0 !important;

  .content {
    padding: 30px 60px 0 80px;
    position: relative;

    >div.icon {
      position: absolute;
      left: 20px;
      width: 40px;
      height: 40px;
      border-radius: 6px;
      background-color: var(--warning-color-light-9);
      display: flex;
      justify-content: center;
      align-items: center;

      .icon-coffee {
        fill: var(--warning-color);
        width: 24px;
        height: 24px;
      }
    }

    >.title {
      color: var(--base-text-color-title);
      font-size: 1.2rem;
      font-weight: bolder;
    }

    >.code {
      padding: 30px 20px;
      display: flex;
      justify-content: space-between;

      >div {
        width: 150px;
        height: 150px;
        background-size: 100% 100%;

        &.wechart {
          background-image: url('@/assets/images/wechart.jpg');
        }

        &.pay {
          background-image: url('@/assets/images/pay.jpg');
        }
      }
    }

    >.text {
      padding-top: 40px;
      color: var(--base-text-color-light2);
    }
  }
}

.m-tooltip {
  
  position: relative;

  > .value {
    display: flex;
    align-items: center;
  }

  .tip {
    opacity: 0;
    position: absolute;
    top: -60px;
    right: 0;
    transform: translateX(40%);
    padding: 6px 8px;
    border-radius: 6px;
    width: max-content;
    box-shadow: var(--base-box-shadow);
    font-size: 0.6em;
    color: var(--base-text-color-secondary);
    background-color: var(--box-bg-color);
    transition: opacity,top 0.5s;
  }

  > .value:hover + .tip {
    opacity: 1;
    top: -30px;
  }

}